package com.example.eureka_client.service;

import com.example.eureka_client.entity.Answer;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.eureka_client.entity.Question;
import com.example.eureka_client.mapper.QuestionMapper;
import com.example.eureka_client.utils.PageRequest;
import com.example.eureka_client.utils.PageResult;

import java.util.List;

/**
 * <p>
 * 问题回答 服务类
 * </p>
 *
 * @author plj
 * @since 2022-03-24
 */
public interface IAnswerService extends IService<Answer> {
    boolean addAnswer(Answer answer);
    boolean editAnswer(String answerId, String content);
    boolean delAnswer(String answerId);
    PageResult getAnswersByQuestionId(String questionId,  PageRequest pageRequest);

    boolean addNotAgreeNum(String answerId, String userId);
    boolean addAgreeNum(String answerId, String userId);
    boolean addLikeNum(String answerId, String userId);
    boolean addCllectionNum(String answerId, String userId);

    boolean reNotAgreeNum(String answerId, String userId);
    boolean reAgreeNum(String answerId, String userId);
    boolean reLikeNum(String answerId, String userId);
    boolean reCllectionNum(String answerId, String userId);

    boolean notAgree(String answerId, String userId);
    boolean agree(String answerId, String userId);
    boolean like(String answerId, String userId);
    boolean cllection(String answerId, String userId);
}
